<?php get_header(); ?>
 <!-- start: middlecontent -->
<div class="midcontent">
	<div class="container_12">
	
               <?php 
               foreach((get_the_category()) as $category) {
				$postcat= $category->cat_ID;   
				}
               if (have_posts()) : while (have_posts()) : the_post(); 
                        $parent_post=$post->post_parent;
                        
            ?>
        <div class="grid_3 ">
                <!-- Start: Leftpart -->
                <div class="content">
                    <!-- Start: content -->
                    <div class="sidebarsubnav">
                          <p><?php the_title(); ?></p>
                           		<ul class="">
                           		
                                <?php
                                /*
                                * post title under current category
                                */

                               if($postcat==4)
                               	$second_query = new WP_Query( array ( 'cat' => '4', 'orderby' => 'id', 'order' => 'ASC' ));
                               elseif($postcat==7)
                               	$second_query = new WP_Query( array ( 'cat' => '7', 'orderby' => 'id', 'order' => 'ASC' ));
                               	
                                while( $second_query->have_posts() ) : $second_query->the_post();  ?>
							       
							        <li><a href="<?php the_permalink() ?>">
							            <?php the_title(); ?></a>
							        </li>
							    	
								<?php endwhile; 
								?>
								</ul>
                    </div>
                    <!-- end: content -->	
                </div>
                <!-- End: Leftpart -->
            </div>
    	<!-- Start: Rightpart -->
    	<div class="grid_9">
      		<div class="content">
            <!-- start: content -->  
				<div id="location">
                            <!-- [breadcrumb] -->
                                    当前位置: <a href="<?php bloginfo('url'); ?>" title="<?php echo bloginfo('name');?>">安全防范实践教学基地运行与管理中心</a> \
                                    <?php  breadcrumb($post->ID); ?>
                            <!--/ [breadcrumb] -->
                            </div>
                <div id="info">
                    <h2><?php the_title(); ?></h2>
                    <div class="meta">
                        发布时间: &nbsp;&nbsp;&nbsp;<?php the_time('Y-m-d') ?> &nbsp;&nbsp;&nbsp;[收藏] [打印] [关闭]
                    </div>
               
                        <?php the_content(); ?>
                  <?php endwhile; else: ?>
                                <p>Sorry, no page found</p>
                  <?php endif; ?>

                </div>
			<!-- end: content -->					
      		</div>
		</div>
		<!-- end: Rightpart -->	
	</div>
</div>
<!-- end: middlecontent -->

<div class="clear">&nbsp;</div>

<?php get_footer(); ?>